﻿using Pdf2epub.Interfaces;
using Pdf2epub.Model;

namespace Pdf2epub.BusinessLogic.Extractors
{
    internal class GalileoOpenBookFontAnalyzer : IFontAnalyzer
    {
        private readonly IProjectContext m_ProjectContext;

        public GalileoOpenBookFontAnalyzer(IProjectContext projectContext)
        {
            m_ProjectContext = projectContext;
        }

        public FontAnalysisResult Analzye()
        {
            ContentBlockCollection contentBlocks = new ContentBlockCollection();
            GalileoOpenBookExtractor extractor = new GalileoOpenBookExtractor(m_ProjectContext, m_ProjectContext.ProjectConfiguration.PdfPath)
            {
                ContentBlocks = contentBlocks
            };

            extractor.CreateContentInContentCollection();

            return new FontAnalysisResult(extractor.FontUsages, 0, 0, 0, 0);
        }
    }
}